package net.xdclass.product.model.vo;

import java.math.BigDecimal;

/**
 * 购物项
 */
public class CartItemVO {
    // 商品ID
    private Long productId;
    // 购买数量
    private Integer count;
    private String productTitle;
    private String productImg;
    // 单价
    private BigDecimal amount;
    // 总价 = 单价 * 数量 = amount * count
    private BigDecimal totalAmount;

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public String getProductTitle() {
        return productTitle;
    }

    public void setProductTitle(String productTitle) {
        this.productTitle = productTitle;
    }

    public String getProductImg() {
        return productImg;
    }

    public void setProductImg(String productImg) {
        this.productImg = productImg;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getTotalAmount() {
        return this.amount.multiply(new BigDecimal(this.count));
    }

}
